import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import animate from 'animate.css'
import http from './utils/http' // axios封装  发送请求

Vue.config.productionTip = false

Vue.use(animate)

Vue.prototype.$get = http.get // get 请求
Vue.prototype.$post = http.post // post 请求

let cooldown = false; // 限制频繁点击
Vue.prototype.$cd = ()=>{
    if(cooldown){
        return true
    }else{
        cooldown = true
        setTimeout(()=>{
            cooldown = false;
        },500);
        return false;
    }
}
// if(this.$cd()) return;   组件中使用放在方法第一行

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
